import { createRouter, createWebHistory } from 'vue-router'
import LoginHome from '@/components/LoginHome.vue'
import Home from '@/components/home/Home.vue'
import Main from '@/components/main/Main.vue'
import PersonalHome from '@/components/main/PersonalHome.vue'
import Detection1 from '@/components/Detection/Detection1.vue'
import Detection2 from '@/components/Detection/Detection2.vue'
import Detection3 from '@/components/Detection/Detection3.vue'
import DetectionResult from '@/components/Detection/DetectionResult.vue'
import HeiBai from '@/components/main/HeiBai.vue'
import Chat from '@/components/AI/Chat.vue'
const routes = [
    {
      path: '/',
      name: 'LoginHome',
      component: LoginHome,
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
    },
    {
      path:'/Main',
      name:'Main',
      component:Main,
      children:[
        {
          path:'',
          name:'PersonalHome',
          component:PersonalHome,
        },
        {
          path:'Detection1',
          name:'Detection1',
          component:Detection1,
        },
        {
          path:'Detection2',
          name:'Detection2',
          component:Detection2,
        },
        {
          path:'Detection3',
          name:'Detection3',
          component:Detection3,
        },
        {
          path:'DetectionResult/:softwareUrl',
          name:'DetectionResult',
          component:DetectionResult,
          props:true,
        },
        {
          path:'HeiBai',
          name:'HeiBai',
          component:HeiBai,
        },
        {
          path:'Chat',
          name:'Chat',
          component:Chat,
        }
      ]
    },
]

const router = createRouter({  
  history: createWebHistory(),  
  routes // 路由配置  
});  
  
export default router;
